package VN.EDU.IMIC.DEVELOPER.TRINHCAOSANG.Exam01.Bai1.Bai2;

/**
 * Created by Sang on 07/03/2016.
 */
public class StudenController implements IMICInterface {
    private StudentEntity studentEntity;
    private StudentsModel studentsModel;

    public StudenController(StudentEntity studentEntity) {
        this.studentEntity = studentEntity;
        this.studentsModel = new StudentsModel();
    }

    @Override
    public String PrintStudentInfo(Object object) {
        StudentEntity studentEntity = (StudentEntity) object;
        return studentsModel.PrintStudentInfo(studentEntity);
    }

    @Override
    public String CheckMark(Object object) {

        StudentEntity studentEntity = (StudentEntity) object;
        return studentsModel.CheckMark(studentEntity);

    }

    @Override
    public boolean CompareTo(Object obj1, Object obj2) {
        StudentEntity studentEntity1 = (StudentEntity) obj1;
        StudentEntity studentEntity2 = (StudentEntity) obj2;
        return studentsModel.CompareTo(studentEntity1, studentEntity2);
    }
}
